<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.incoming.member.maintenance']}">
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<h:panelGrid>
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>		
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%">
				<h:panelGroup>
				    <h:outputText value="#{messages['rci.incoming.member']}" styleClass="sub_header" />
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
			</h:panelGrid>
		</h:panelGroup>
		
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		
		<h:outputText></h:outputText>
		<t:message for="icPassportNo" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="icPassportNo" value="#{messages['ic.passport.no']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="icPassportNo" size="20" maxlength="20" required="true" styleClass="standardText" value="#{adminRCIBean.rciIncomingMember.icPassportNo}"></t:inputText>
		
		<h:outputText></h:outputText>
		<t:message for="fullName" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="fullName" value="#{messages['name.as.in.ic.passport']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="fullName" size="50" maxlength="50" required="true" styleClass="standardText" value="#{adminRCIBean.rciIncomingMember.fullName}"></t:inputText>
		
		<h:outputText></h:outputText>
		<t:message for="registerDate" styleClass="error"></t:message>
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="registerDate" value="#{messages['register.date']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    	<t:inputCalendar
		    	id="registerDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{adminRCIBean.rciIncomingMember.registerDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true" required="true"
					styleClass="standardText" 
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>
		
		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['update']}" styleClass="button" action="#{adminRCIBean.updateRCIIncomingMemberAction}" actionListener="#{adminRCIBean.updateRCIIncomingMemberActionListener}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.initRCIIncomingMemberAction}" actionListener="#{adminRCIBean.initRCIIncomingMemberActionListener}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	